<h1><?php echo $title;?></h1>
<br />
<p>
	<a href="<?php echo base_url();?>index.php/admin/dashboard/createuser"><input type="button" class="btn" value="Create New User" /></a>
</p>
<br />
<?php //echo anchor("admin/dashboard/createuser", "Add new user");?>
<?php
if ($this->session->flashdata('message')){
	echo "<div class='message'>".$this->session->flashdata('message')."</div>";
}

if (count($users)){
	echo "<table id='rounded-corner' class='tablesorter' border='1' cellspacing='0' cellpadding='3' width='100%'>\n";
	echo "<thead>\n<tr valign='top'>\n";
	echo "<th>No</th>\n<th>Username</th><th>Email</th><th>Role</th><th>Activate</th><th>Actions</th>\n";
	echo "</tr>\n</thead>\n<tbody>\n";
	$i = 1;
	foreach ($users as $key => $list){
		echo "<tr valign='top'>\n";
		echo "<td align='center'>".$i++."</td>\n";
		echo "<td align='center'>".$list['username']."</td>\n";
		echo "<td align='center'>".$list['email']."</td>\n";
		echo "<td align='center'>".$list['title']."</td>\n";
		if($list['activate']==1) 
			$activate = 'active';
		else 
			$activate = 'inactive';
			
		echo "<td align='center'>". $activate."</td>\n";
		echo "<td align='center'>";
		echo anchor('admin/dashboard/edituser/'.$list['uid'],'edit');
		echo " | ";
		echo anchor('admin/dashboard/deleteuser/'.$list['uid'],'delete',array('class'=>'delete-item'));
		echo "</td>\n";
		echo "</tr>\n";
	}
	echo "</tbody>\n</table>";
}
?>